<template>
  <div>
    <el-form
      ref="form"
      :model="form"
      label-width="80px
    "
    >
      <el-form-item label="企业名称">
        <el-input v-model="form.name" :disabled="true" />
      </el-form-item>
      <el-form-item label="公司地址">
        <el-input v-model="form.companyAddress" :disabled="true" />
      </el-form-item>
      <el-form-item label="公司电话">
        <el-input v-model="form.companyPhone" :disabled="true" />
      </el-form-item>
      <el-form-item label="邮箱">
        <el-input v-model="form.mailbox" :disabled="true" />
      </el-form-item>
      <el-form-item label="备注">
        <el-input v-model="form.remarks" :disabled="true" />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { company } from '@/api/setting'
import { mapState } from 'vuex'

export default {
  data() {
    return {
      form: {}
    }
  },

  created() {
    this.getinfo()
  },

  methods: {
    async getinfo() {
      const res = await company(this.userInfo.companyId)
      //   console.log(res)
      this.form = res.data
    }
  },

  computed: {
    ...mapState('user', ['userInfo'])
  }
}
</script>

<style lang="scss" scoped></style>
